#pragma once
namespace html { namespace dom
{
  using namespace std;
  using namespace boost;

  //////////////////////////////////////////////////////////////////////////
  // classes
  //////////////////////////////////////////////////////////////////////////

  inline const class_set& class_set::operator+= (symbol _sym) {
    // append class name to class set
    insert(_sym);
    return *this;
  }
  inline const class_set& class_set::operator-= (symbol _sym) {
    // remove class name to class set
    erase(_sym);
    return *this;
  }
  inline ostream& operator<< (ostream& _os, class_set _classes) { 
    // begin with the first class' name
    class_set::iterator it=_classes.begin();
    // print out to _os
    _os << (const string&)*it;
    // move forward to the second one
    it++;
    // iterate all following class names
    for (; it!=_classes.end(); ++it)
      // print out class name with leading space
      _os << " " << (const string&)*it;
    return _os;
  }
} }
